<HTML><HEAD><TITLE>name(?Atomnumber, ?List)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Obsolete</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>name(?Atomnumber, ?List)</H1>
Succeeds if List is the corresponding list of ASCII codes for the atom or
number Atomnumber.


<DL>
<DT><EM>Atomnumber</EM></DT>
<DD>Atom, number or variable.
</DD>
<DT><EM>List</EM></DT>
<DD>List of integers (each in the range 1 to 127) and/or                variables, or else a variable.
</DD>
</DL>
<H3>This built-in predicate is obsolete!</H3>
<H2>Description</H2>
   If Atomnumber is an atom or a number, unifies List with the list of its
   corresponding ASCII codes.  Real numbers can be any length in decimal
   format, though fractions are evaluated to 6 decimal places.  The codes
   are of each character of the atom, or of each digit (or decimal point)
   of the number.

<P>
   If List is instantiated, unifies Atomnumber with the atom or number
   corresponding to this list of ASCII integers.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>name(+, -) is det
<LI>name(-, +) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Neither Atomnumber nor List are ground.
<DT><EM>(5) type error </EM>
<DD>Atomnumber is instantiated, but not to an atom or a number.
<DT><EM>(5) type error </EM>
<DD>List is instantiated, but not to a list.
<DT><EM>(6) out of range </EM>
<DD>List is a list containing an integer outside the range 1 to    127.
</DL>
<H2>Examples</H2>
<PRE>
   Success:
   name(atom,[97,116,111,109]).
   name(atom,[X,116|T]).        (gives X=97,T=[111,109]).
   name(/,[47]).
   name(10,[49,48]).
   name(20.0,[50,48,46,48]).
   name(2,[50]).
   name(+2,L).                  (gives L=[50]).
   name(-2,L).                  (gives L=[45,50]).
   name('1',[0'1]).
   X is 1/3, name(X,Y).         % X unifies with 0.333333
   (gives Y=[48,46,51,51,51,51,51,51]).
   Fail:
   name(atom,[98,116,111,109]).
   name('1',B), name(C,B), C='1'. % 1 does not unify with '1'.
   name(1.0,[0'1,0'.,0'0,0'0]).   % 1.0 is not 1.00
   Error:
   name(AN,[1,M]).     (Error 4).
   name(AN,L).         (Error 4).
   name(f(1,2),L).     (Error 5).
   name(AN,[128]).     (Error 6).
   name(AN,[0]).       (Error 6).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/stratom/number_string-2.html">number_string / 2</A>, <A HREF="../../kernel/stratom/atom_string-2.html">atom_string / 2</A>, <A HREF="../../kernel/obsolete/char_int-2.html">char_int / 2</A>, <A HREF="../../kernel/stratom/integer_atom-2.html">integer_atom / 2</A>, <A HREF="../../kernel/stratom/string_list-2.html">string_list / 2</A>, <A HREF="../../kernel/stratom/string_list-3.html">string_list / 3</A>, <A HREF="../../kernel/termmanip/term_string-2.html">term_string / 2</A>
</BODY></HTML>
